{% extends 'list/base.html' %}
{% block press %}
active
{% endblock %}
{% block content %}
 <h1 class="page-header">出版社列表</h1>

            <!--面板 开始-->
            <div class="panel panel-default">
                <div class="panel-heading">出版社列表</div>
                <div class="panel-body">
                    <!--表格上面的那一行-->
                    <div class="row">
                        <div class="col-md-4">
                            <div class="input-group">
                                <input type="text" class="form-control" placeholder="Search for...">
                                <span class="input-group-btn">
                      <button class="btn btn-default" type="button">Go!</button>
                    </span>
                            </div><!-- /input-group -->
                        </div><!-- /.col-lg-6 -->
                        <div class="col-md-1 pull-right">
                            <a class="btn btn-success pull-right" href="/add_press/">添加</a>
                        </div>
                    </div>
                    <!--表格上面那一行 结束-->
                    <!--表格 开始-->
                    <div class="table-box">
                        <table class="table table-bordered table-striped">
                            <thead>
                            <tr>
                                <th class="text-center">序号</th>
                                <th class="text-center">出版社id</th>
                                <th class="text-center">出版社名字</th>
                                <th class="text-center">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {% for i in press_obj %}
                                <tr class="text-center">
                                    <td>{{ forloop.counter }}</td>
                                    <td>{{ i.id }}</td>
                                    <td>{{ i.name }}</td>
                                    <td>
                                        <a class="btn btn-danger btn-sm" href={% url 'delete' 'press' i.id %}>删除</a>
                                        <a class="btn btn-info btn-sm"href={% url 'edit_press' i.id %}>编辑</a>
                                    </td>
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                    </div>
{% endblock %}
